package com.hjm.project.terminal.agentTargetInfo.agentTargetInfo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.terminal.agentTargetInfo.agentTargetInfo.mapper.AgentTargetInfoMapper;
import com.hjm.project.terminal.agentTargetInfo.agentTargetInfo.domain.AgentTargetInfo;
import com.hjm.project.terminal.agentTargetInfo.agentTargetInfo.service.IAgentTargetInfoService;
import com.hjm.common.utils.text.Convert;

/**
 * 代理上指标记录明细Service业务层处理
 * 
 * @author maker-platform
 * @date 2021-03-02
 */
@Service
public class AgentTargetInfoServiceImpl implements IAgentTargetInfoService 
{
    @Autowired
    private AgentTargetInfoMapper agentTargetInfoMapper;

    /**
     * 查询代理上指标记录明细
     * 
     * @param id 代理上指标记录明细ID
     * @return 代理上指标记录明细
     */
    @Override
    public AgentTargetInfo selectAgentTargetInfoById(Integer id)
    {
        return agentTargetInfoMapper.selectAgentTargetInfoById(id);
    }

    /**
     * 查询代理上指标记录明细列表
     * 
     * @param agentTargetInfo 代理上指标记录明细
     * @return 代理上指标记录明细
     */
    @Override
    public List<AgentTargetInfo> selectAgentTargetInfoList(AgentTargetInfo agentTargetInfo)
    {
        return agentTargetInfoMapper.selectAgentTargetInfoList(agentTargetInfo);
    }

    /**
     * 新增代理上指标记录明细
     * 
     * @param agentTargetInfo 代理上指标记录明细
     * @return 结果
     */
    @Override
    public int insertAgentTargetInfo(AgentTargetInfo agentTargetInfo)
    {
        return agentTargetInfoMapper.insertAgentTargetInfo(agentTargetInfo);
    }

    /**
     * 修改代理上指标记录明细
     * 
     * @param agentTargetInfo 代理上指标记录明细
     * @return 结果
     */
    @Override
    public int updateAgentTargetInfo(AgentTargetInfo agentTargetInfo)
    {
        return agentTargetInfoMapper.updateAgentTargetInfo(agentTargetInfo);
    }

    /**
     * 删除代理上指标记录明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAgentTargetInfoByIds(String ids)
    {
        return agentTargetInfoMapper.deleteAgentTargetInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除代理上指标记录明细信息
     * 
     * @param id 代理上指标记录明细ID
     * @return 结果
     */
    @Override
    public int deleteAgentTargetInfoById(Integer id)
    {
        return agentTargetInfoMapper.deleteAgentTargetInfoById(id);
    }
}
